From 4e09bce2c4d36e61762ea6f8e30bdcaf8dcc42a5 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 27 Nov 2006 20:59:32 +0000 Subject: [PATCH] Tweak return of xvasprintf() to make it match Linux & FreeBSD behaviour. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2546 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 2dc7ed9b9..1849e9bd8 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -288,6 +288,11 @@ xfputs(const char *errtxt, const char *s, FILE *stream) /* * Allocate a string using a format list with optional arguments + * Returns -1 on error. + * If return value is anything else, *strp will be populated with an + * allocated string containging the formatted buffer. + * + * Freeing that is the responsbility of the caller. */ int @@ -361,7 +366,7 @@ xasprintf(char **strp, const char *fmt, ...) } } *strp = buf; - return 0; + return outsize; } /* -- 2.30.2